<schema xmlns="http://www.w3.org/2001/XMLSchema"
    xmlns:rmsg="urn:oasis:names:tc:emergency:EDXL:RM:1.0:msg"
    targetNamespace="urn:oasis:names:tc:emergency:EDXL:RM:1.0:msg"
    xmlns:rm="urn:oasis:names:tc:emergency:EDXL:RM:1.0"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    elementFormDefault="qualified"
    attributeFormDefault="unqualified">
  <xsd:import namespace="urn:oasis:names:tc:emergency:EDXL:RM:1.0"
 schemaLocation="EDXL-RMCommonTypes.xsd"/>
  <!-- This schema is the base reference schema for all EDXL-RM messages.  
        All resource messages will conform to this schema and to the elementicular 
     sub-schema corresponding to the message type.-->
  <complexType name="EDXLResourceMessageReferenceType">
    <sequence>
      <element name="MessageID" type="rm:MessageIDType"/>
      <element name="SentDateTime" type="rm:DateTimeType"/>
      <element name="MessageContentType" type="rm:MessageContentTypeType"/>
      <element name="MessageDescription" type="rm:MessageDescriptionType"
    minOccurs="0" maxOccurs="1"/>
      <element name="OriginatingMessageID" type="rm:MessageIDType"/>
      <element name="PrecedingMessageID" type="rm:MessageIDType"
     minOccurs="0" maxOccurs="1"/>
      <element name="IncidentInformation" type="rm:IncidentInformationType"
     minOccurs="0" maxOccurs="unbounded"/>
      <element name="MessageRecall" type="rm:MessageRecallType"
     minOccurs="0" maxOccurs="1"/>
      <element name="Funding" type="rm:FundingType" minOccurs="0"
     maxOccurs="unbounded"/>
      <element name="ContactInformation" type="rm:ContactInformationType"
     minOccurs="1" maxOccurs="unbounded"/>
      <element name="ResourceInformation" minOccurs="0" maxOccurs="unbounded">
        <complexType>
          <sequence>
            <element name="ResourceInfoElementID"
           type="rm:ResourceInfoElementIDType"/>
            <element name="ResponseInformation" type="rm:ResponseInformationType"
           minOccurs="0" maxOccurs="1"/>
            <element name="Resource" minOccurs="0" maxOccurs="1">
              <complexType>
                <sequence>
                  <!-- One (or more) of first three elements is required -->
                  <element name="ResourceID" type="rm:ResourceIDType" minOccurs="0"
                 maxOccurs="1"/>
                  <element name="Name" type="rm:ResourceNameType" minOccurs="0"
                 maxOccurs="1"/>
                  <element name="TypeStructure" type="rm:ValueListType" minOccurs="0"
                 maxOccurs="1"/>
                  <element name="TypeInfo" type="rm:TypeInfoType" minOccurs="0"
                 maxOccurs="1"/>
                  <element name="Keyword" type="rm:ValueListType" minOccurs="0"
                 maxOccurs="unbounded"/>
                  <element name="Description" type="rm:DescriptionType" minOccurs="0"
                 maxOccurs="1"/>
                  <element name="Credentials" type="rm:CredentialsType" minOccurs="0"
                 maxOccurs="1"/>
                  <element name="Certifications" type="rm:CertificationsType"
                 minOccurs="0" maxOccurs="1"/>
                  <element name="SpecialRequirements"
                 type="rm:SpecialRequirementsType" minOccurs="0" maxOccurs="1"/>
                  <element name="ResponsibleParty" type="rm:ContactInformationType"
                 minOccurs="0" maxOccurs="1"/>
                  <element name="OwnershipInformation"
                 type="rm:OwnershipInformationType" minOccurs="0" maxOccurs="1"/>
                  <element name="ResourceStatus" minOccurs="0" maxOccurs="1">
                    <complexType>
                      <sequence>
                        <element name="InventoryRefreshDateTime"
                       type="rm:DateTimeType" minOccurs="0" maxOccurs="1"/>
                        <element name="DeploymentStatus" type="rm:ValueListType"
                       minOccurs="0" maxOccurs="1"/>
                        <element name="Availability" type="rm:AvailabilityType"
                       minOccurs="0" maxOccurs="1"/>
                      </sequence>
                    </complexType>
                  </element>
                </sequence>
              </complexType>
            </element>
            <element name="AssignmentInformation" minOccurs="0" maxOccurs="1">
              <complexType>
                <sequence>
                  <element name="Quantity" type="rm:QuantityType" minOccurs="0"
                 maxOccurs="1"/>
                  <element name="Restrictions" type="rm:RestrictionsType"
                 minOccurs="0" maxOccurs="1"/>
                  <element name="AnticipatedFunction"
                 type="rm:AnticipatedFunctionType" minOccurs="0" maxOccurs="1"/>
                  <element name="PriceQuote" type="rm:PriceQuoteType" minOccurs="0"
                 maxOccurs="1"/>
                  <element name="OrderID" type="rm:OrderIDType" minOccurs="0"
                 maxOccurs="1"/>
                  <element name="AssignmentInstructions"
                 type="rm:AssignmentInstructionsType" minOccurs="0" maxOccurs="1"/>
                </sequence>
              </complexType>
            </element>
            <element name="ScheduleInformation" minOccurs="0" maxOccurs="unbounded">
              <complexType>
                <sequence>
                  <element name="ScheduleType" type="rm:ScheduleTypeType"/>
                  <element name="DateTime" type="rm:DateTimeType" minOccurs="0"
                 maxOccurs="1"/>
                  <element name="Location" type="rm:LocationType" minOccurs="0"
                 maxOccurs="1"/>
                </sequence>
              </complexType>
            </element>
          </sequence>
        </complexType>
      </element>
    </sequence>
  </complexType>
</schema>
